<div class="content container-fluid">
    <header>
        <h4>
            <i class="icon-file-alt"></i>
            Data Pemilik Senjata
        </h4>
    </header>
    <div class="row-fluid">
        <div class="span11">
            <section class="widget">
                <div class="body">
                    <blockquote>
                        <a href="<?php echo site_url('dashboard/tambahdata');?>"><button class="btn btn-primary">Tambah Data </button></a>
                    </blockquote>
                    <table id="datatable-table" class="table table-striped">
                        <thead>
                            <tr>
                                <th>No</th>
                                <th>Nama</th>
                                <th>Pangkat</th>
                                <th>No. AK</th>
                                <th class="hidden-phone-landscape">Nomor Senjata</th>
                                <th class="hidden-phone-landscape">Status</th>
                                <th class="no-sort hidden-phone-landscape">Action</th>
                            </tr>
                        </thead>
                        <tbody>

                            <?php 
                            $i = 0;
                            if ($data != null) 
                            foreach ($data as $dt) {  $i++; ?>
                           
                            <tr>
                             <td><?php echo $i; ?></td>
                             <td><?php echo $dt->nama; ?></td>
                             <td><?php echo $dt->pangkat; ?></td>
                             <td><?php echo $dt->nomor_ak; ?></td>
                             <td><?php echo $dt->nomor_senjata; ?></td>
                            <td><?php if($dt->keterangan == 1){ echo "Masuk"; }else{ echo "Keluar"; } ?></td>
                            <td class="hidden-phone-landscape"> 
                             <div class="btn-group">
                                <button class="btn btn-success dropdown-toggle" data-toggle="dropdown">
                                    Aksi
                                    <i class="icon-caret-down"></i>
                                </button>
                                <ul class="dropdown-menu">
                                    <li><a href="<?php echo site_url('dashboard/barcode').'/'.$dt->id_siswa; ?>">Lihat Barcode</a></li>
                                    <li><a href="<?php echo site_url('dashboard/editdata').'/'.$dt->id_siswa; ?>">Edit Data</a></li>
                                    <li><a href="<?php echo site_url('dashboard/hapusdata').'/'.$dt->id_siswa; ?>" onclick="return confirm('Anda yakin ?');">Hapus Data</a></li>
                                </ul>
                            </div>

                        </td>
                    </tr>

                    <?php } ?>

                </tbody>
            </table>
        </div>
    </section>
</div>
</div>
</div>
</div>